<?php
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------

namespace app\common\model;
use think\Db;
/**
 * 设置模型
 */
class Notice extends Base{
	protected $auto = array('update_time');
	protected $insert = array('create_time');
	protected $type = array(
		'id'   => 'integer',
		'cover_id'   => 'integer',
	);

	public $keyList = array(
		array('name'=>'id', 'title'=>'ID', 'type'=>'hidden', 'help'=>'', 'option'=>''),
		array('name'=>'title', 'title'=>'公告标题', 'type'=>'text', 'help'=>'', 'option'=>''),
		array('name'=>'url', 'title'=>'公告链接', 'type'=>'text', 'help'=>'', 'option'=>''),
	);
       /**
        * 获取分类列表
        */
        public static function getNoticeList($where=[],$order=''){
           return Db::name('notice')->where($where)->order($order)->paginate();
       } 
}